home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.teleport.com!sschaem
- From: sschaem@teleport.com (Stephan Schaem)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Amiga programmers in deep shit...
- Date: 16 Jan 1996 16:39:53 GMT
- Organization: Teleport - Portland's Public Access (503) 220-1016
- Distribution: inet
- Message-ID: <4dgkcp$9s5@maureen.teleport.com>
- References: <4ccpsd$d8f@maureen.teleport.com> <jdj68ec2xw7.fsf@pulkka.cs.hut.fi>
- NNTP-Posting-Host: linda.teleport.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- Osma Ahvenlampi (Osma.Ahvenlampi@hut.fi) wrote:
- : In article <4de1ok$ren@maureen.teleport.com> sschaem@teleport.com (Stephan Schaem) writes:
- : > I wrote the above because one claim the OS is all you need to do
- : > multimedia software. Writepixel could have been VERY fast if the library
- : > supported display list... because the writepixel env would be kept
- : > and the speed for the second and next pixel could have been totaly
- : > optimal. But CBM only offered that solution... and its plain lame.
-
- : WritePixelLine8(), WritePixelArray8(), BltBitMap()....
-
- Read again... do you see your wrong assumtion? Do you know the
- concept of a display list? did you even understand what I was talking
- about?
-
- Having a writepixels(displaylist) is used to write random pixels,
- not to write a Hline...
-
- In the display list you could probably do something like store
- draw(x,y) and setpen(pen). The header sturcture probably hold
- some aray context flag... like defining the type of the
- vsariable x,y,pen. Now here is the inner loop like you would
- see it implemented for type word,word, ubyte on a gfx card supporitng
- a 8bit chunky mode and with no upfront layer.
- (I wont go into the detail unless you are interested)
-
- .Loop8 REPEAT 8
- move.w (a0)+,d0
- bmi.b .Skyp1
- move.w (a0)+,d1
- bmi.b .Skyp2
- cmp.w d0,d2
- ble.b .Skyp3
- cmp.w d1,d3
- ble.b .Skyp3
- lea (a1,d0.w),a3
- adda.l (a2,d2.w*4),a3
- mb (a0)+,(a3)+
- ENDR
- dbra d4,.Loop
-
- Now have 5000 pixel in your array... what is faster? The loop above
- calling setpen/writepixel 5000 time?
-
- Real life example: Ploting color coded vector in a 3d modeler
-
- This example apply to lines or any other primitive too,
- but less dramatic.
-
- Stephan
-